//
//  DefinitionsArrayController.m
//  Words2
//
//  Created by Mathieu on 28/09/06.
//  Copyright 2006 __MyCompanyName__. All rights reserved.
//

#import "DefinitionsArrayController.h"
#import "DefinitionMO.h"
#import "WordsAppDelegate.h"

@implementation DefinitionsArrayController

-(void)awakeFromNib{
	NSSortDescriptor *lastNameDescriptor=[[[NSSortDescriptor alloc] initWithKey:@"rank" 
                                                    ascending:YES] autorelease];
	NSArray *sortDescriptors=[NSArray arrayWithObject:lastNameDescriptor];
	[self setSortDescriptors:sortDescriptors];
}
-(NSString *)definitionsCountInfo{
	//return [NSString stringWithFormat:@"%@ of %@",[self selectionIndex], [[self arrangedObjects] count]];
	NSLog(@"defcount: %@", [[self arrangedObjects] count]);
	return [NSString stringWithFormat:@"%d", [[self arrangedObjects] count]];
}

//-(void)addObject:(id)definition{
//	[definition setValue:[[[NSApp delegate] currentlySelectedTransLanguage] valueForKey:@"name"] forKey:@"capabilityKey"];
//	NSLog(@"set capabilityKey to : %@", [definition valueForKey:@"capabilityKey"]);
//	[super addObject:definition];
//}

@end
